<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>React 18 快速入门</title>
	</head>
	<body>
		<!-- 1. 创建容器标签 -->
		<div id="app"></div>
		
		
		<!-- 2. 引入React框架 -->
		<script src="./js/react.development.js"></script>
		<script src="./js/react-dom.development.js"></script>
		
		<script>
			// 3. 构建应用
			// 绑定`React`实例root
			let app = document.querySelector("#app")
			let root = ReactDOM.createRoot(app)
			
			// 创建一个新的标签节点
			let h1 = React.createElement("h1", {
				id: "title",
				className: "pageInfo"
			}, "你好 React 18!")
			
			// 将节点渲染到根节点上
			root.render(h1)
		</script>
		
	</body>
</html>